namespace Collaboris.Saf.Actions.Wss.Tests.Generated
{
    using System.Collections.Generic;

    using Engine.Report;

    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Saf.Tests;
    using Entities;

    using SharePoint.Wss.Webs;

    using Wss.PropertyBag;

    [TestClass]
    public class EnsurePropertyBagItemsTest
    {

        /// <summary>
        /// This test was originally generated but has now been tested and verfiied by MJ
        /// </summary>
        [TestMethod]
        public void EnsurePropertyBagItems_Test()
        {
            WSSTestAssistant<EnsurePropertyBagItems, PropertyBagInfo> ensurepropertybagitems =
                    new WSSTestAssistant<EnsurePropertyBagItems, PropertyBagInfo>(TestEnvironment.PublishingSite,
                        "EnsurePropertyBagItemsTestWeb", "BLANKINTERNET#0");

            using (ensurepropertybagitems)
            {
                MacroReport doReport = ensurepropertybagitems.DoMacro();

                foreach (KeyValuePair<string, object> o in ensurepropertybagitems.FirstEntity.KeyValuePairs)
                {
                    Assert.IsTrue(SPWebHelper.GetProperty<string>(ensurepropertybagitems.TestWeb, "StringKey1") == "AStringValue");
                    Assert.IsTrue(SPWebHelper.GetProperty<int>(ensurepropertybagitems.TestWeb, "IntKey1") == 3);
                    Assert.IsTrue(SPWebHelper.GetProperty<List<string>>(ensurepropertybagitems.TestWeb, "ListKey1")[0] == "string 1");
                }

            }
        }

    }
}
